import 'package:flutter/material.dart';

import 'const.dart';
import 'discover_item.dart';

class DiscoverPage extends StatefulWidget {
  const DiscoverPage({super.key});

  @override
  _DiscoverPageState createState() {
    return _DiscoverPageState();
  }
}

class _DiscoverPageState extends State<DiscoverPage> {
  final Color _themeColor = Color.fromRGBO(220, 220, 220, 1.0);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: _themeColor,
        title: Text("weChat"),
        elevation: 1.0,
        centerTitle: true,
      ), body: Container(
      height: 800,
      color: WeChatThemeColor,
      child: ListView(
        children: <Widget>[
          DiscoverItem(
            imageName: 'assets/images/朋友圈.png',
            title: '朋友圈',
          ),
          SizedBox(
            height: 10,
          ),
          DiscoverItem(
            imageName: 'assets/images/扫一扫2.png',
            title: '扫一扫',
          ),
          Row(
            children: <Widget>[
              Container(width: 50, height: 0.5, color: Colors.white),
              Container(height: 0.5, color: Colors.grey)
            ],
          ),
          DiscoverItem(
            imageName: 'assets/images/摇一摇.png',
            title: '摇一摇',
          ),
          SizedBox(
            height: 10,
          ),
          DiscoverItem(
            imageName: 'assets/images/看一看icon.png',
            title: '看一看',
          ),
          Row(
            children: <Widget>[
              Container(width: 50, height: 0.5, color: Colors.white),
              Container(height: 0.5, color: Colors.grey)
            ],
          ),
          DiscoverItem(
            imageName: 'assets/images/搜一搜 2.png',
            title: '搜一搜',
          ),
          SizedBox(
            height: 10,
          ),
          DiscoverItem(
            imageName: 'assets/images/附近的人icon.png',
            title: '附近的人',
          ),
          SizedBox(
            height: 10,
          ),
          DiscoverItem(
            imageName: 'assets/images/购物.png',
            title: '购物',
            subTitle: '618限时特价',
            subImageName: 'assets/images/badge.png',
          ),
          Row(
            children: <Widget>[
              Container(width: 50, height: 0.5, color: Colors.white),
              Container(height: 0.5, color: Colors.grey)
            ],
          ),
          DiscoverItem(
            imageName: 'assets/images/游戏.png',
            title: '游戏',
          ),
          SizedBox(
            height: 10,
          ),
          DiscoverItem(
            imageName: 'assets/images/小程序.png',
            title: '小程序',
          ),
        ],
      ),
    ),
    );
  }
}
